package com.itheima.reggie.common;

public class UserHolder {
    private static final ThreadLocal THREAD_LOCAL =new ThreadLocal();

    public static void set(Long userId){
        THREAD_LOCAL.set(userId);
    }
    public static Long get(){
        return (Long) THREAD_LOCAL.get();
    }
    public static void remove(){
        THREAD_LOCAL.remove();
    }
}
